async function newTrends(data){
    let selectSql =''
    let selectTotalSql =''
    const selectRows = await global.sql(selectSql)
    const selectTotal = await global.sql(selectTotalSql)
    return {
        code: 200,
        msg: '请求成功',
        data: {
            list: selectRows,
            total: selectTotal[0].total
        }
    }
}

// 获取路线列表
async function getTrends(data) {
    let selectSql =''
    let selectTotalSql =''
    const selectRows = await global.sql(selectSql)
    const selectTotal = await global.sql(selectTotalSql)
    return {
        code: 200,
        msg: '请求成功',
        data: {
            list: selectRows,
            total: selectTotal[0].total
        }
    }

}

// 生成路线
async function generateRoute(data) {
    let selectSql =''
    let selectTotalSql =''
    const selectRows = await global.sql(selectSql)
    const selectTotal = await global.sql(selectTotalSql)
    return {
        code: 200,
        msg: '请求成功',
        data: {
            list: selectRows,
            total: selectTotal[0].total
        }
    }
}

// 更新路线
async function updateRoute(data) {
    let selectSql =''
    let selectTotalSql =''
    const selectRows = await global.sql(selectSql)
    const selectTotal = await global.sql(selectTotalSql)
    return {
        code: 200,
        msg: '请求成功',
        data: {
            list: selectRows,
            total: selectTotal[0].total
        }
    }
}


exports.newTrends = newTrends
